﻿@using KacincisinProject.Data
@model List<KacincisinProject.Data.Sinavlar>
@{
    ViewBag.Title = "SinavlarListele";
}

<style type="text/css">
    table {
        border: 2px solid black;
        padding: 2px 2px 2px 2px;
    }

    table td, th {
        border: 1px solid gray;
        margin: 5px 5px 5px 5px;
    }
</style>
<br>
<h2>Sınavlar Listesi</h2>
<table>
    <tr>
        <th>Sınav Id</th>
        <th>Sınav Tip Id</th>
        <th>Sınav Adi</th>
        <th>Sınav Süresi</th>
        <th>Sınav Başlangıç Tarihi</th>
        <th>Created By</th>
        <th>Created Date</th>
        <th>Is Updated</th>
        <th>Updated By</th>
        <th>Updated Date</th>
        <th>Is Deleted</th>
        <th>Deleted By</th>
        <th>Deleted Date</th>
        <th></th>
    </tr>
    @foreach (KacincisinProject.Data.Sinavlar sinav in Model)
    {
        <tr>
            <td>@sinav.SinavId</td>
            <td>@sinav.SinavTipId</td>
            <td>@sinav.SinavAdi</td>
            <td>@sinav.SinavSuresi</td>
            <td>@sinav.SinavBaslangicTarihi</td>
            <td>@sinav.CreatedBy</td>
            <td>@sinav.CreatedDate</td>
            <td>@sinav.IsUpdated</td>
            <td>@sinav.UpdatedBy</td>
            <td>@sinav.UpdatedDate</td>
            <td>@sinav.IsDeleted</td>
            <td>@sinav.DeletedBy</td>
            <td>@sinav.DeletedDate</td>
            <td>@Html.ActionLink("Sınav Güncelle", "SinavGuncelle", "Sinav", new { id = sinav.SinavId}, null)</td>@*null htmle sitil vermiyorum anlamında*@
            <td>@Html.ActionLink("Sınav Sil", "SinavSil", "Sinav", new { id = sinav.SinavId}, null)</td>
            @*<td>@Html.ActionLink("Sınava Başla", "SinavaBasla", "Sinav", new { id = sinav.SinavId}, null)</td>*@
            <td><button type="button" class="btn" onclick="javascript:window.external.SinavaBasla('@Url.Action("SinavaBasla", "Sinav", new { id = sinav.SinavId }, Request.Url.Scheme)');">Sınava Başla</button></td>
        </tr>
    }
</table>
<br/>
@Html.ActionLink("Yeni Sınav Olustur","SinavOlustur","Sinav")

